// components/DefineTextArea/index.js
Component({
  options: {
    multipleSlots: true
  },
  properties: {
    text: {
      type: Boolean,
      value: false
    },
    placeholder: {
      type: String,
      value: ''
    },
    value: {
      type: String,
      value: ''
    },
    errorMsg: {
      type: String,
      value: ''
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onInput(event) {
      this.setData({
        errorMsg: ''
      });
      const {
        value
      } = event.detail;
      this.setData({
        value
      });
      this.triggerEvent('input', value.trim());
    },
  }
})